import React from "react"
// import "./style.less"
import SearchInput from "../../SearchInput" 

export default class LocateHead extends React.Component{
    constructor(){
        super();
        this.state = {
            inputContent: '请输入城市名或名称'
        }
    }
    searchKeyWordFun(placeName){
        this.props.history.push('/locate/'+encodeURIComponent(placeName));
    }
    
    render (){
        let { inputContent } = this.state;
        return (
            <div className="home-header-container">
                <div className="home-header-left"> 
                </div> 
                <div className="home-header-middle">
                   <SearchInput inputContent={inputContent} searchKeyWordFun={this.searchKeyWordFun.bind(this)}/>
                </div>
                <div className="home-header-right">   
                </div>
            </div>
        )
    }

}

